﻿namespace EasyGo.App_Start
{
    using System.Web.Optimization;

    public class BundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.FileSetOrderList.Clear();
            var libs = new ScriptBundle("~/js/libs");
            libs.Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/jquery-ui-{version}.js",
                "~/Scripts/jquery.ba-bbq.js",
                "~/Scripts/knockout-{version}.js",
                "~/Scripts/knockout.validation.js",
                "~/Scripts/knockout.mapping-latest.js",
                "~/Scripts/knockout.command.js",
                "~/Scripts/knockout.activity.js",
                "~/Scripts/require.js",
                "~/Scripts/text.js",
                "~/Scripts/select2.js",
                "~/Scripts/ko.widgets.js",
                "~/Scripts/moment.js",
                "~/Scripts/bootstrap.js");
            bundles.Add(libs);

            var app = new ScriptBundle("~/js/app");
            app.IncludeDirectory("~/app/core", "*.js", true);
            app.IncludeDirectory("~/app/viewModels", "*.js", true);
            app.Include("~/app/main.js");
            bundles.Add(app);

            bundles.Add(
                new StyleBundle("~/content/css/styles").Include(
                    "~/Content/css/app.css",
                    "~/Content/css/metro-bootstrap.css",
                    "~/Content/themes/base/jquery-ui.css",
                    "~/Content/css/select2.css"));
        }
    }
}